package com.cps116.friendstracker;

import java.util.ArrayList;
import java.util.List;

import com.cps116.parcelables.LocationTraceList;
import com.cps116.parcelables.MapParcelableData;
import com.cps116.parcelables.Coordinate;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;

public class TestingActivity extends Activity{

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		
	}

	@Override
	protected void onDestroy() {
		super.onDestroy();
	}

	@Override
	protected void onPause() {
		super.onPause();
	}

	@Override
	protected void onStart() {
		super.onStart();
		
		Intent mapIntent = new Intent(this, FriendsFinderMapActivity.class);
		
		List<MapParcelableData> mapData = new ArrayList<MapParcelableData>();
		
		List<Coordinate> coords = new ArrayList<Coordinate>();
		coords.add(new Coordinate(37.422, -122.084));
		coords.add(new Coordinate(33.128763, -83.9445));
		coords.add(new Coordinate(34.179121, -91.842814));
		coords.add(new Coordinate(37.422,-142.084));
		boolean toUpdate= true;
		long updateTime = 100000;
		String userName = "joe";
		String userId = "01231241";
		
		MapParcelableData inputData = new MapParcelableData(coords, toUpdate, userName, userId, updateTime);
		mapData.add(inputData);
		
		
		List<Coordinate> coords_2 = new ArrayList<Coordinate>();
		coords_2.add(new Coordinate(234.422, -122.084));
		coords_2.add(new Coordinate(12.128763, -83.9445));
		coords_2.add(new Coordinate(123.179121, -22.842814));
		coords_2.add(new Coordinate(-12.422,-100.084));
		boolean toUpdate_2= true;
		long updateTime_2 = 100000;
		String userName_2 = "john";
		String userId_2 = "11231241";
		
		MapParcelableData inputData_2 = new MapParcelableData(coords_2, toUpdate_2, userName_2, userId_2, updateTime_2);
		mapData.add(inputData_2);
		
		
		LocationTraceList parcelableList = new LocationTraceList(mapData);
		mapIntent.putExtra("overlays", parcelableList);
		mapIntent.putExtra("update_time", updateTime);
		mapIntent.putExtra("need_to_update", true);
		
		startActivity(mapIntent);
	}

}
